home *** CD-ROM | disk | FTP | other *** search
- @echo off
- ! move.bat Batch file to move a folder or a file to a folder
- !
- ! move name [dest]
- !
- ! where 'name' is the item to be moved and 'dest' is the folder which
- ! shall contain 'name'. Both names can be preceded by paths and volume IDs.
- ! If 'dest' is missing, the current directory is used as destination.
- !
- ! move.bat executes movefile and movedir
- !
- ! Copyright © 1994 by Rainbow Hill Pty Ltd. All rights reserved.
- !
-
- ! ensure that the first parameter is there and that the third one is not
- set doserr=13
- if not "%3 " == " " goto ERR_LBL
- if "%1 " == " " goto ERR_LBL
-
- ! do the moving
- if existdir "%1" movedir "%1" "%2"
- movefile "%1" "%2"
- ! it never returns
-
- :ERR_LBL
- show %doserr%
-